import request from '@/utils/request'
import id from 'element-ui/src/locale/lang/id'

// 考试项目列表
export function examProjectsList() {
  return request({
    url: '/business/examProjects/list',
    method: 'get'
  })
}

// 查询考点列表
export function listPlace(query) {
  return request({
    url: '/business/examPlaces',
    method: 'get',
    params: query
  })
}

// 查询考点详情
export function getById(id) {
  return request({
    url: '/business/examPlaces/' + id,
    method: 'get'
  })
}

// 新增考点
export function examPlaces(data) {
  return request({
    url: '/business/examPlaces',
    method: 'post',
    data: data
  })
}

// 修改考点
export function updatePlaces(data, id) {
  return request({
    url: '/business/examPlaces/' + id,
    method: 'put',
    data: data
  })
}

// 删除考点
export function delPlace(id) {
  return request({
    url: '/business/examPlaces/' + id,
    method: 'delete'
  })
}

// 查看对应考点项目规则
export function findRules(id) {
  return request({
    url: '/business/examPlaceProjectAssigns/findRules/'+id,
    method: 'get'
  })
}
